package com.peak.distribution.vo.order;

import java.util.Date;

import com.peak.distribution.enums.Constants;
import com.peak.spring.boot.api.web.IdVo;
import com.peak.spring.boot.core.mapper.Format;
import com.peak.spring.boot.core.mapper.Format.TransferFormat;
import com.peak.spring.boot.core.mapper.Transfer;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 购物车的VO
 * @author Haley Gao
 *
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class DisCartVo extends IdVo {
	
	private static final long serialVersionUID = Constants.DISTRIBUTION_VERSION;

	/** 购买数量 */
	private Integer quantity;

	/** 购买人 */
	@Transfer(mapping = "agent.id")
	private Integer agentId;

	/** 商品 */
	@Transfer(mapping = "goods.id")
	private Integer goodsId;
	
	/** 商品名称 */
	@Transfer(mapping = "goods.name")
	private String goodsName;
	
	/** 商品图片 */
	@Transfer(mapping = "goods.defaultImage")
	private String goodsDefaultImage;

	/** 商品加入购物车时间 */
	@Format(format = TransferFormat.DATE)
	private Date createTime;
}
